gridpack::utility::CoarseTimer Class Reference

#include <coarse_timer.hpp>

Collaboration diagram for gridpack::utility::CoarseTimer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

int createCategory (const std::string title)
void start (const int idx)
void stop (const int idx)
void dump (void) const
void dumpProfile (const int idx) const
void dumpProfile (const std::string title)
double currentTime ()
void configTimer (bool flag)

Static Public Member Functions

static CoarseTimerinstance ()

Member Function Documentation

void gridpack::utility::CoarseTimer::configTimer ( bool  flag  ) 

Turn timing on and off. If timing is off, no data is collected.

Parameters:
flag turn timer on (true) or off (false)
int gridpack::utility::CoarseTimer::createCategory ( const std::string  title  ) 

Create a new timer category and return a handle to the category. It is up to the application to keep track of this handle.

Parameters:
title the title is the name that will be used to label the timing statistics in the output
Returns:
an integer handle that can be used to refer to this category
double gridpack::utility::CoarseTimer::currentTime (  ) 

Return current time. Can be used to solve timing problems that can't be handled using the regular timing capabilities

Returns:
current time in seconds according to internal clock
void gridpack::utility::CoarseTimer::dump ( void   )  const

Write all timing statistics to standard out

void gridpack::utility::CoarseTimer::dumpProfile ( const std::string  title  ) 

Write out profile for all processors for requested title

Parameters:
idx category title
void gridpack::utility::CoarseTimer::dumpProfile ( const int  idx  )  const

Write out profile for all processors for requested handle

Parameters:
idx category handle
static CoarseTimer* gridpack::utility::CoarseTimer::instance (  )  [static]

Retrieve instance of the CoarseTimer object

void gridpack::utility::CoarseTimer::start ( const int  idx  ) 

Start timing the category

Parameters:
idx category handle
void gridpack::utility::CoarseTimer::stop ( const int  idx  ) 

Stop timing the category

Parameters:
idx category handle

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 3 Feb 2020 for GridPACK by  doxygen 1.6.1